<?php
/**
 * Created by PhpStorm.
 * User: sunzexin
 * Date: 2017/12/28
 * Time: 14:58
 */

namespace App\Http\Traits;


use Illuminate\Http\Request;

trait PartyTrait
{
    use BaseTrait;

    //登陆者loginSession
    protected $loginSession;
    // 合作者ID
    protected $partner_id;
    // partyID
    protected $party_id;
    // party名称
    protected $name;
    // party横幅
    protected $cover;
    // 用户数
    protected $user_count;
    // 活动开始日期
    protected $start_date;
    // 活动结束日期
    protected $end_date;
    // 活动开始时间
    protected $start_time;
    // 活动结束时间
    protected $end_time;
    // 活动简介
    protected $summary;
    // 活动坐标
    protected $latlng;
    // 活动地址
    protected $address;
    // 咖啡馆ID
    protected $cafe_id;
    // 活动分类
    protected $category;
    // 活动联系人
    protected $linkman;
    // 活动联系方式
    protected $phone;
    // 参与活动费用
    protected $price;
    // 活动参加密码
    protected $password;
    // 杯测类型
    protected $cupping;
    // 用户手机号
    protected $mobile;
    // 发送系统通知必要的form_id
    protected $form_id;
    // 活动分类ID
    protected $party_category_id;
    // 合作者key
    protected $key;
    // 分页大小
    protected $limit;
    // 活动状态
    protected $status;
    public function __construct(Request $request)
    {
        $this->loginSession = $request->input('loginSession', '');
        $this->partner_id = $request->input('partner_id', 0);
        $this->party_id = $request->input('party_id', 0);
        $this->name = $request->input('name', '');
        $this->cover = $request->input('cover', '');
        $this->user_count = $request->input('users_count', 0);
        $this->start_date = $request->input('start_date', '');
        $this->end_date = $request->input('end_date', 1);
        $this->start_time = $request->input('start_time', '');
        $this->end_time = $request->input('end_time', '');
        $this->summary = $request->input('summary', '');
        $this->latlng = $request->input('latlng', '');
        $this->address = $request->input('address', '');
        $this->cafe_id = $request->input('cafe_id', 0);
        $this->category = $request->input('category', 0);
        $this->linkman = $request->input('linkman', '');
        $this->phone = $request->input('phone', '');
        $this->price = $request->input('price', 0);
        $this->password = $request->input('password', '');
        $this->cupping = $request->input('cupping', '');
        $this->mobile = $request->input('mobile', '');
        $this->form_id = $request->input('form_id', '');
        $this->party_category_id = $request->input('party_category_id', 0);
        $this->key = $request->input('key', '');
        $this->limit = $request->input('limit', 0);
        $this->status = $request->input('status', '');
    }
}